#include "my_time.h"
#include <omp.h>

#define N 10000
int main() {

  MyTimeI;
  MyTimeA;

  int A[N], B[N], i;
#pragma omp parallel num_threads(4)
  {
    if (!omp_get_thread_num())
      printf("Number of threads: %d\n", omp_get_num_threads());
#pragma omp for
    for (i = 0; i < N; i++) {
      B[i] = i;
      A[i] = 2 * B[i];
    }
  }
  MyTimeB;

  printf("A[n]=%d, B[n]=%d\n", A[N - 1], B[N - 1]);
  return 0;
}